<?php
class Core_Model_Tokencheckout implements Core_Model_Mainable{
    
    private $core_controller_hackerredirect;
    
    public function __construct() {
        $this->core_controller_hackerredirect = new Core_Controller_Hackredirect;
    }
    
    public function main(array $variables = null){
        //var_dump($variables);
        //die();
        if(!isset($_SESSION['csrf_token']) || !isset($variables['csrf_token']) || ($_SESSION['csrf_token'] != $variables['csrf_token'])){
            session_destroy();
            return $this->core_controller_hackerredirect->main($variables);
        }
    }
}
